﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="_课堂练习3自定义验证.aspx.cs" Inherits="WebApplication1._课堂练习3自定义验证" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <style>
        p{
            color:dimgrey;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <h2>自定义验证控件</h2>
            <p>注册用户名不可以是 <span>zfq888</span> <span>wsx888</span> </p>
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="用户名不通过" ControlToValidate="TextBox1" Display="Dynamic" ForeColor="#FF3300" OnServerValidate="CustomValidator1_ServerValidate"></asp:CustomValidator>
            <asp:Button ID="Button1" runat="server" Text="Button" />
        </div>
    </form>
</body>
</html>
